//如果用uni请求
// import http from './http.interceptor.js';

//如果是用uview请求,就用下面这句
const http = uni.$u.http

let api = {
	loginByWx: params => http.post('login/loginByWx', params), //用户登陆
	loginSendSmsCode: params => http.post('login/sendSmsCode', params), //获取手机号验证码
	loginBySmsCode: params => http.post('login/loginBySmsCode', params), //根据手机号短信码登录
		
	merchantAroundArea: params => http.get('merchant/aroundArea', {params: params}), //获取附件的商户
	merchantCabinetInfo: params => http.get('merchant/cabinetInfo', {params: params}), //获取商户设置的价格
	merchantInfo: params => http.get('merchant/info', {params: params}), //获取商户详情

	ordersList: params => http.get('orders/list', {params: params}), //获取订单列表
	ordersSubmitOrder: params => http.post('orders/submitOrder', params), //提交订单
	ordersFinishOrder: params => http.post('orders/finishOrder', params), //结束订单
	ordersNoFinish: params => http.get('orders/noFinish', {params: params}), //使用中的订单
	ordersInfo: id => http.get('orders/info/'+id), //使用中的订单
	
	
	userInfo: params => http.get('user/info', {params: params}), //获取商户详情
	
	
	payWxScoreTrade: params => http.post('pay/wx/score/trade', params), //微信支付分
	payWxTrade: params => http.post('pay/wx/pay/trade', params), //微信支付

}


export default api;